package cn.wolfcode.p2p.base.query;

import cn.wolfcode.p2p.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.jdbc.Null;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.Date;

/**
 * 视频认证查询列表
 */
@Setter@Getter
public class VideoAuthQuery extends QueryObject {

    private Long auditorId; //审核人的id
    private Integer state = -1; //审核状态
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate; //开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate; //结束时间
    public Date getEndDate() {
        return DateUtil.getEndDate(endDate);
    }
    private String username; //预约用户

    public String getUsername(){
        return StringUtils.hasLength(this.username)? this.username.trim():null;
    }
}
